#pragma once
#include<iostream>
#include<algorithm>
#include<map>
#include<string>
#include<string.h>
#include<time.h>
#include<vector>
using namespace std;

class Exam
{
private:
	struct Exercise
	{
		int l, r, id;
		char ope;
		int ans;
		bool operator<(const Exercise a) const
		{
			return this->id < a.id;
		}
		bool operator==(const Exercise a) const
		{
			if (this->ope == '+' || this->ope == '*')
				return (this->ope == a.ope && (this->l == a.l&&this->r == a.r || this->l == a.r&&this->r == a.l));
			else
				return (this->ope == a.ope&&this->l == a.l&&this->r == a.r);
		}
	};
	int time;
	vector<Exercise>num_exer;
	int ans[1000];
	int qus_num;
public:
	Exam();
	virtual ~Exam();
	void CreatExam(int num, string ope,int mo);
	int* GetAns();
};

